package com.springboot2.authserver.basic.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.security.Principal;

/**
 * 用户信息控制器
 *
 * @author miaoyang
 */
@Slf4j
@RestController
public class UserController {

    @RequestMapping("/user")
    public Principal getUser(Principal user) {
        log.info(user.toString());
        return user;
    }

}
